#ifndef __CLASS_HH__
#define __CLASS_HH__

//boost
#include <boost/shared_ptr.hpp>
#include <boost/utility.hpp>


//project
#include "BaseClass.hh"
#include "TypeDcl.hh"


namespace Reflection
{

/**
 * @brief
 */
template< typename TClassType >
class Class : public BaseClass, public boost::noncopyable
{
public:
    typedef boost::shared_ptr< Class >          Ptr;
    typedef typename TClassType::Type           ClassType;

public: //derived from BaseClass
    virtual const BaseTypeDcl& getTypeDcl( void )
    {
        static const TClassType __type;
        return __type;
    }

public:
    /**
     * @brief
     */
    virtual ~Class( void )
    {
    }

    /**
     * @brief
     */
    static typename BaseClass::Ptr createInstance( void )
    {
        return typename Class::Ptr( new Class() );
    }

    /**
     * @brief
     */
    

private:
    /**
     * @brief Default ctor
     * Creates class instance for further usage
     */
    Class( void )
    {
        iClassInstance = typename TClassType::TypePtr( new ClassType() );
    };
    
    ///Class instance object
    typename TClassType::TypePtr iClassInstance;
};

} // namespace Reflection

#endif //__CLASS_HH__
